<?php
 Zend_Loader::loadClass("CodesUtility");
 Zend_Loader::loadClass("BaseDBRow");
 class Staff extends BaseDBRow
{
	const _tablename = "projecte_entity.staffs";
	protected function setUp()
	{
		$this->_tableName = self::_tablename;		
	}
	
	public function getStaffCompleteName($staffId) {
		
		Zend_Loader::loadClass("QueryCreator");
		
		$query = new QueryCreator();
		$query->addSelect("concat(first_name,' ',last_name) staff_name");
		$query->addFrom($this->_tableName . " s ");
		$query->addWhere("staff_id = " . $staffId);
		
		$db = DBCon::instance();
		// echo  $query->createSQL();die();
		$result = $db->executeQuery($query->createSQL());
		return $result;
		
	}
}
?>